### THESE ARE NOTES FROM PREVIOUS WORK, KEPT FOR REFERENCE. NONE OF THESE STEPS ARE REQUIRED TO USE THE GPS DATA PROCESSING SCRIPTS IN THE PARENT DIRECTORY.

## Download the CRX2RNX tool precompiled binary

# Download the pre-compiled Linux binary
cd /tmp
wget https://terras.gsi.go.jp/ja/crx2rnx/RNXCMP_4.2.0_Linux_gcc_64bit.tar.gz

# Extract
tar -xzf RNXCMP_4.2.0_Linux_gcc_64bit.tar.gz

# Install to system path
sudo cp RNXCMP_4.2.0_Linux_gcc_64bit/CRX2RNX /usr/local/bin/

# Make executable
sudo chmod +x /usr/local/bin/CRX2RNX

# Create lowercase symlink (rnx2rtkp looks for lowercase)
sudo ln -s /usr/local/bin/CRX2RNX /usr/local/bin/crx2rnx

# Test
crx2rnx -h


## Download CORS corrections from here: https://www.ngs.noaa.gov/CORS/

## If base station CORS files are compressed (.25d format), decompress them
ls msin*.25d | xargs -n 1 -P 4 crx2rnx

## Combine base station observations into one file
./combine_rinex.sh msin_combined.obs msin*.25o

## Perform corrections on a .obs file using base station files as reference
cd CORS\ STATION\ MSIN\ NOV\ 2025/

rnx2rtkp \ -t -u \
  -o ../../A/DATA/result.pos \
  ../../A/DATA/20251120_033544.006_UTC_GPS_A_combined.obs \
  msin_combined.obs \
  ../../A/DATA/20251120_033544.006_UTC_GPS_A_combined.nav

## The result.pos file now contains PPK corrected GPS data in LLH format